#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

void Test1()
{
    string s1, s2;
    int _min = INT_MAX;

    cin >> s1 >> s2;
    for (int i = 0; i <= s2.size() - s1.size(); i++)
    {
        int count = 0;
        for (int j = 0; j < s1.size(); j++)
        {
            if (s1[j] != s2[i + j])
            {
                count++;
            }
        }
        _min = min(_min, count);
    }

    cout << _min << endl;
}

void Test2()
{

}

typedef long long ll;

int main() {

    int n; cin >> n;
    vector<ll> v(n, 0);
    for (int i = 0; i < n; i++)
    {
        cin >> v[i];
    }
    sort(v.begin(), v.end(), greater<int>());

    bool x = true;
    for (int i = 0; i < n; i++)
    {
        if (v[0] != v[i] && v[0] / v[i] % 2 != 0)
        {
            cout << "NO" << endl;
            x = false;
            break;
        }
    }



    if (x) cout << "YES" << endl;
    return 0;
}

int a[100000];
int dp[100000];

int mai1n() {
    int V, n; cin >> V >> n;

    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++)
    {
        for (int j = V; j >= a[i]; j--)
        {
            dp[j] = max(dp[j], dp[j - a[i]] + a[i]);
        }
    }
    cout << V - dp[V];
}